home *** CD-ROM | disk | FTP | other *** search
- Appendix I
-
- Editing DESQview Scripts
-
- The scripts you create using DESQview's Learn feature are written to disk in
- a special encoded format. They cannot be viewed or changed. Sometimes it's
- useful to be able to see these scripts, to edit them, or to create your own
- scipts directly~dash~by typing in the keystrokes to the DESQview Notepad
- Companion or to a word processor. The Convert a Script program lets you do
- this.
-
- Before you can use Convert a Script, however, you must install it in DESQview
- (see Adding a Program on pages 62-63). The program file is located on the
- drive and directory where you installed DESQview (most commonly, C:\DV).
-
- ~Subhead~ Using the Convert A Script program
-
- To run the Convert a Script program:
-
- ~Step~ Display the Open Window menu and select Convert a Script.
-
- The Convert a Script window appears, asking you whether you want to convert
- a scripts file to a text file (S), a text file to a scripts file (T), or exit
- (X).
-
- ~Step~ Type S and press <Enter>. Then, enter the name of the scripts file you
- want to convert to a text file and press <Enter>. Finally, enter the name you
- want to give to the converted text file and press <Enter>.
-
- The default name of a program's scripts file is xx-SCRIPT.DVS, where xx are
- the letters used to select the program from the Open Window menu~dash~or,
- DESQVIEW.DVS for scripts for the DESQview menu.
-
- ~Step~ Edit the text file using your favorite word processor. Save as an
- ASCII file (no formatting).
-
- ~Step~ Switch back to the Convert a Script window. Type T and press <Enter>.
- Enter the name of the text file you just edited and press <Enter>. Then,
- enter the name you want the scripts file to have (normally, its original
- name) and press <Enter>.
-
- As each line of the text file is converted to a scripts file, it's displayed
- in the Convert a Script window. If an error is found, processing stops after
- displaying the line containing the error~dash~press any key to continue
- processing the rest of the file. Then, to load the modified scripts:
-
- ~Step~ Switch back the program whose scripts you just edited and use the Load
- Scripts command to load the modified scripts (see page 89).
-
- ~Subhead~ Editing Scripts Using the Notepad Companion
-
- If you have the Notepad Companion, you can edit scripts files directly.
- When you load a file with the extension DVS into Notepad, it automatically
- converts it into a text file~dash~and then back to a scripts file when you
- save it.
-
- ~Step~ Start up DESQview Notepad. Type N to select "non-document" mode.
- Then, enter the script name and press <Enter>.
-
- ~Step~ Modify or delete existing scripts, add new scripts, or both. Then,
- terminate editing by typing ^KC.
-
- ~Step~ Put the modified scripts into effect by re-loading the scripts file.
-
- ~Subhead~ How to Edit a Script File
-
- When you convert a scripts file to a text file (or when you load a scripts
- file into DESQview Notepad), each script is converted into its textual
- representation, which can be edited and then converted back to scripts file
- format. The standard typewriter keys appear as themselves. All other keys are
- represented by the "key labels" delimited by curly brackets. The tables in
- the remainder of this appendix list the complete set of valid "key labels"
- and special Learn keys that DESQview recognizes. There can be any number of
- scripts in a scripts file.
-
- Each script has the folowing 3 directives:
-
- 1. {Learn KEY "script name"} or: {Learn {key label} "script name"}
- 2. keystrokes
- 3. {Finish}
-
- where:
-
- ~Item~ KEY is the actual typewriter key; key label is the name of the key
- being redefined. For example, X is the typewriter key, X (case significant);
- {F1} is the key label for the function key, F1; {Alt-0} is the key label for
- the Alt-O (case insignificant) combination keypress.
-
- ~Item~ script name is the name of the script as it should appear on the
- Display Scripts menu. The script name may have embedded blanks. The quotes
- are mandatory. To omit the script name, enter "".
-
- ~Item~ keystrokes is the body of the script~dash~that is, all of the keys and
- key labels (listed below and on the next two pages) that the script performs
- when it's played back. You may have an unlimited number (except for buffer
- size~dash~see page 84) of keystrokes in a script.
-
- ~Item~ {Finish} is the label that marks the end of an individual script in a
- scripts file.
-
- Line feeds and carriage returns in the file are ignored, so keystrokes can
- be as long as you need. All other keys are part of the script.
-
- ~Subhead~ Special Learn Keys
-
- The special Learn key names listed below are recognized during script
- playback.
-
- Begin Table
-
- {^Alt-Del}, Abort the Current Window.
-
- {Delay n}, Wait for n seconds.
-
- {DESQ}, Display the DESQview menu.
-
- {Display-Scripts}, Display the Display Scripts menu.
-
- {Finish}, Terminates script definition.
-
- {Fixed-Pause n}, Pause until n characters are typed.
-
- {Learn key "name"}, Start defining a new script (embedded learn).
-
- {Load-Scripts "filename"}, Load the scripts file filename.
-
- {Save-Scripts "filename"}, Save scripts to the file filename.
-
- {Switch}, Switch to the next window in turn.
-
- {Variable-Pause}, Pause until <Enter> is entered.
-
- ~End Table~
-
- ~Subhead~ Standard Keys and Extended Codes
-
- The standard typewriter keys are entered into Learn scripts themselves. The
- standard PC extended key codes are entered into Learn scripts as the key name
- enclosed in curly brackets~dash~as listed below.
-
- ~Begin Table~
-
- Standard Keys and Extended Codes
-
-
- Letters
- Lowercase, a to z
- Uppercase, A to Z
- With Ctrl, {^A } to {^Z}
- With Alt, {Alt-A} to {Alt-Z}
-
- Numbers
- Alone, 0 to 9
- With Alt, {Alt-0} to {Alt-9}
-
- Symbols
- Alone, . , ; : ' " / ` < > ? !
- % \ & * + - = ^
- ( ) [ ] { } | _
- With Ctrl, {^/} {^[} {^]} {^^} {^ _ }
- With Alt, {Alt- ~dash~} {Alt- =}
-
- Function Keys
- Alone, F1 to F10
- With Shift, {Shift-F1} to {Shift-F10}
- With Ctrl, {^F1} to {^F10}
- With Alt, {Alt-F1} to {Alt-F10}
-
- Other Keys
- Alone, {BackSpace} {Left} {BackTab} {LineFeed} {Del} {Null} {Down}
- {PgDn} {End} {PgUp} {Enter} {Right} {Esc} {Space} {Home} {Tab} {Ins} {Up}
- With Ctrl, {^BackSpace} {^Break} {^PgUp} {^End} {^PrtSc} {^Home} {^Right}
- {^Left}
-
- Keypad Keys
- Numbers {Keypad 0} to {Keypad 9}
- Symbols, {Keypad +} {Keypad *}{Keypad -} {Keypad .}
-
- ~End Table~
-
- To enter the {` key alone, use {{}.
-
- The 255 ASCII codes can also be entered as {1} to {255}.
-
- Any scan code can be entered as a signed decimal number, {-32768} to
- {32767}. For example, you could enter the scan code 4E2BH (gray +) as
- {20011}.
-
- ASCII 0 is known as {Null}. You cannot enter it as {0} or {^.
-
- {LineFeed} is generated by pressing ^Enter.
-
- ` has special meaning to Learn (see page 40). You must press it twice to
- enter a single `.
-
- ~Subhead~ Enhanced Keyboard Keys
-
- The enhanced PC keyboard has additional extended key codes that aren't
- available on regular PC, PC-XT, or PC-AT keyboards~dash~as listed below.
-
- ~Begin Table~
-
- Enhanced PC Keyboard Only
-
- Symbols, With Alt, {Alt-.} {Alt-[} {Alt-,} {Alt-]}
- {Alt-;} {Alt-\} {Alt-'} {Alt-`} {Alt-/}
-
- Function Keys
- Alone, F11 to F12
- With Shift, {Shift-F11} to {Shift-F12}
- With Ctrl, {^F11} to {^F12}
- With Alt, {Alt-F11} to {Alt-F12}
-
-
- Other Keys
- With Ctrl, {^Tab}
- With Alt, {Alt-BackSpace} {Alt-Esc} {Alt-Enter} {Alt-Tab}
-
- Keypad Keys
- Alone, {Center Cursor} {Keypad LineFeed}{Keypad Enter} {Keypad /}
- With Ctrl, {^Center Cursor} {^Keypad -} {^Del} {^Keypad *} {^Down}
- {^Keypad /} {^Ins} {^Up} {^Keypad +}
- With Alt, {Alt-Keypad Enter} {Alt-Keypad *} {Alt-Keypad +}
- {Alt-Keypad /} {Alt-Keypad -}
-
- Cursor Pad Keys
- Alone, {CursorPad Del}~dagger~ {CursorPad Left}~dagger~
- {CursorPad Down}~dagger~ {CursorPad PgDn}~dagger~
- {CursorPad End}~dagger~ {Cursor Pad Up}~dagger~
- {CursorPad Home}~dagger~ {CursorPad PgUp}~dagger~
- {CursorPad Ins}~dagger~ {CursorPad Right}~dagger~
- With Ctrl, {CursorPad^Del} {CursorPad^Left}~dagger~
- {CursorPad^Down} {CursorPad^PgDn}~dagger~
- {CursorPad^End}~dagger~ {CursorPad^PgUp}~dagger~
- {CursorPad^Home}~dagger~ {CursorPad^Right}~dagger~
- {CursorPad^Ins} {CursorPad^Up}
- With Alt, {Alt-Del} {Alt-Left}{Alt-Down} {Alt-PgDn} {Alt-End} {Alt-Right}{Alt-Home}
- {Alt-PgUp}{Alt-Ins} {Alt-Up}
-
- ~End Table~
-
- ~Table Note~
- ~dagger~
- Indicates keys that are understandable by programs not
- written for the enhanced PC keyboard.
-